// 引入Service和请求头ServiceName
import { Service, ServiceName } from '@/network/http.js'
import store from '@/store/index.js' // 引入store

const api = {
  /**
    * 获取货权转移数据
    * @param {Object} params 检索条件的obj
    */
  queryAll (params) {
    return Service.get(
      `/${ServiceName}/api/external/TYardCollectionTicketController/queryAll`,
      { params }
    )
  },
  /**
    * 审核数据
    */
  insert (params) {
    store.commit('changeStatus', true)
    return Service.post(
      `/${ServiceName}/api/external/TYardCollectionTicketController/insert`, params
    )
  },
  /**
    * 回显数据
    */
  selectTYardCollectionTicket (params) {
    return Service.get(
      `/${ServiceName}/api/external/TYardCollectionTicketController/selectTYardCollectionTicket`,
      { params }
    )
  },
  /**
    * 查询计划
    */
   queryPlan (params) {
    return Service.get(
      `/${ServiceName}/api/external/TYardCollectionTicketController/queryPlan`,
      { params }
    )
  },
}
export default api